//
//  ChangeMobileViewController.m
//  Fangmm
//
//  Created by 阮琦 on 16/3/4.
//  Copyright © 2016年 com.fangmm. All rights reserved.
//

#import "ChangeMobileViewController.h"
#import "NewMobileVerifyViewController.h"

#import "Utility.h"
#import "User.h"
#import <MobClick.h>

@interface ChangeMobileViewController ()

@end

@implementation ChangeMobileViewController {
    __weak IBOutlet UILabel *yourmobileLabel;
}
-(void)viewWillAppear:(BOOL)animated
{
    [MobClick beginLogPageView:@"更改手机号页"];
}
-(void)viewWillDisappear:(BOOL)animated
{
    [MobClick endLogPageView:@"更改手机号页"];

}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self configureNavigationBar];
    [yourmobileLabel setText:[NSString stringWithFormat:@"您当前的手机号为%@",[User sharedUser].mobile]];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
#pragma mark - Configuring the view’s layout behavior
- (void)configureNavigationBar {
    self.title = @"更换手机";
    self.navigationItem.hidesBackButton = true;
    UIImage *backImage = [[UIImage imageNamed:@"back-18-36"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UIBarButtonItem *leftBarButton = [[UIBarButtonItem alloc]initWithImage:backImage style:UIBarButtonItemStyleDone target:self action:@selector(clickToPopBack)];
    self.navigationItem.leftBarButtonItem = leftBarButton;
}

- (IBAction)clickToChangeMobile:(UIButton *)sender {
    NewMobileVerifyViewController *newMobileVC = [[NewMobileVerifyViewController alloc]initWithNibName:@"NewMobileVerifyViewController" bundle:nil];
    [self.navigationController pushViewController:newMobileVC animated:true];
}

- (void)clickToPopBack {
    [self.navigationController popViewControllerAnimated:true];
}

@end
